
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('@/views/Login.vue'),
        },

        {
            path: '/home',
            name: 'home',
            component: () => import('@/views/Home.vue'),
            children:[
                {
                    name:'home_redirect',
                    path: '',
                    redirect: '/home/record'
                },
                {   
                    name:'record',
                    path:'record', 
                    component:() => import('@/components/home/GenerateRecord.vue'),
                },
                {   
                    name:'menu_list',
                    path:'menu_list', 
                    component:() => import('@/components/home/MenuList.vue'),
                },

                {   
                    name:'share_list',
                    path:'share_list', 
                    component:() => import('@/components/home/GenerateShare.vue'),
                },
                {   
                    name:'user_list',
                    path:'user_list', 
                    component:() => import('@/components/home/UserList.vue'),
                },
            ]
        },


    ],
})

export default router